Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-log(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-log(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-log - |
| 317 | Show commit logs |
| 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 323 | <div class="para"><p><em>git log</em> <option>…</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 324 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 325 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 326 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 327 | <div class="para"><p>Shows the commit logs.</p></div> |
| 328 | <div class="para"><p>The command takes options applicable to the <em>git-rev-list</em> |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 329 | command to control what is shown and how, and options applicable to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 330 | the <em>git-diff-*</em> commands to control how the changes |
| 331 | each commit introduces are shown.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 332 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 333 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 334 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 335 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 336 | <dt> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 337 | -p |
| 338 | </dt> |
| 339 | <dd> |
| 340 | <p> |
| 341 | Generate patch (see section on generating patches). |
| 342 | |
| 343 | </p> |
| 344 | </dd> |
| 345 | <dt> |
| 346 | -u |
| 347 | </dt> |
| 348 | <dd> |
| 349 | <p> |
| 350 | Synonym for "-p". |
| 351 | </p> |
| 352 | </dd> |
| 353 | <dt> |
| 354 | -U<n> |
| 355 | </dt> |
| 356 | <dd> |
| 357 | <p> |
| 358 | Shorthand for "--unified=<n>". |
| 359 | </p> |
| 360 | </dd> |
| 361 | <dt> |
| 362 | --unified=<n> |
| 363 | </dt> |
| 364 | <dd> |
| 365 | <p> |
| 366 | Generate diffs with <n> lines of context instead of |
| 367 | the usual three. Implies "-p". |
| 368 | </p> |
| 369 | </dd> |
| 370 | <dt> |
| 371 | --raw |
| 372 | </dt> |
| 373 | <dd> |
| 374 | <p> |
| 375 | Generate the raw format. |
| 376 | |
| 377 | </p> |
| 378 | </dd> |
| 379 | <dt> |
| 380 | --patch-with-raw |
| 381 | </dt> |
| 382 | <dd> |
| 383 | <p> |
| 384 | Synonym for "-p --raw". |
| 385 | </p> |
| 386 | </dd> |
| 387 | <dt> |
| 388 | --stat[=width[,name-width]] |
| 389 | </dt> |
| 390 | <dd> |
| 391 | <p> |
| 392 | Generate a diffstat. You can override the default |
| 393 | output width for 80-column terminal by "--stat=width". |
| 394 | The width of the filename part can be controlled by |
| 395 | giving another width to it separated by a comma. |
| 396 | </p> |
| 397 | </dd> |
| 398 | <dt> |
| 399 | --numstat |
| 400 | </dt> |
| 401 | <dd> |
| 402 | <p> |
| 403 | Similar to --stat, but shows number of added and |
| 404 | deleted lines in decimal notation and pathname without |
| 405 | abbreviation, to make it more machine friendly. For |
| 406 | binary files, outputs two <tt>-</tt> instead of saying |
| 407 | <tt>0 0</tt>. |
| 408 | </p> |
| 409 | </dd> |
| 410 | <dt> |
| 411 | --shortstat |
| 412 | </dt> |
| 413 | <dd> |
| 414 | <p> |
| 415 | Output only the last line of the --stat format containing total |
| 416 | number of modified files, as well as number of added and deleted |
| 417 | lines. |
| 418 | </p> |
| 419 | </dd> |
| 420 | <dt> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 421 | --dirstat[=limit] |
| 422 | </dt> |
| 423 | <dd> |
| 424 | <p> |
| 425 | Output only the sub-directories that are impacted by a diff, |
| 426 | and to what degree they are impacted. You can override the |
| 427 | default cut-off in percent (3) by "--dirstat=limit". If you |
| 428 | want to enable "cumulative" directory statistics, you can use |
| 429 | the "--cumulative" flag, which adds up percentages recursively |
| 430 | even when they have been already reported for a sub-directory. |
| 431 | </p> |
| 432 | </dd> |
| 433 | <dt> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 434 | --summary |
| 435 | </dt> |
| 436 | <dd> |
| 437 | <p> |
| 438 | Output a condensed summary of extended header information |
| 439 | such as creations, renames and mode changes. |
| 440 | </p> |
| 441 | </dd> |
| 442 | <dt> |
| 443 | --patch-with-stat |
| 444 | </dt> |
| 445 | <dd> |
| 446 | <p> |
| 447 | Synonym for "-p --stat". |
| 448 | |
| 449 | </p> |
| 450 | </dd> |
| 451 | <dt> |
| 452 | -z |
| 453 | </dt> |
| 454 | <dd> |
| 455 | <p> |
| 456 | NUL-line termination on output. This affects the --raw |
| 457 | output field terminator. Also output from commands such |
| 458 | as "git-log" will be delimited with NUL between commits. |
| 459 | </p> |
| 460 | </dd> |
| 461 | <dt> |
| 462 | --name-only |
| 463 | </dt> |
| 464 | <dd> |
| 465 | <p> |
| 466 | Show only names of changed files. |
| 467 | </p> |
| 468 | </dd> |
| 469 | <dt> |
| 470 | --name-status |
| 471 | </dt> |
| 472 | <dd> |
| 473 | <p> |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 474 | Show only names and status of changed files. See the description |
| 475 | of the <tt>--diff-filter</tt> option on what the status letters mean. |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 476 | </p> |
| 477 | </dd> |
| 478 | <dt> |
| 479 | --color |
| 480 | </dt> |
| 481 | <dd> |
| 482 | <p> |
| 483 | Show colored diff. |
| 484 | </p> |
| 485 | </dd> |
| 486 | <dt> |
| 487 | --no-color |
| 488 | </dt> |
| 489 | <dd> |
| 490 | <p> |
| 491 | Turn off colored diff, even when the configuration file |
| 492 | gives the default to color output. |
| 493 | </p> |
| 494 | </dd> |
| 495 | <dt> |
| 496 | --color-words |
| 497 | </dt> |
| 498 | <dd> |
| 499 | <p> |
| 500 | Show colored word diff, i.e. color words which have changed. |
| 501 | </p> |
| 502 | </dd> |
| 503 | <dt> |
| 504 | --no-renames |
| 505 | </dt> |
| 506 | <dd> |
| 507 | <p> |
| 508 | Turn off rename detection, even when the configuration |
| 509 | file gives the default to do so. |
| 510 | </p> |
| 511 | </dd> |
| 512 | <dt> |
| 513 | --check |
| 514 | </dt> |
| 515 | <dd> |
| 516 | <p> |
| 517 | Warn if changes introduce trailing whitespace |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 518 | or an indent that uses a space before a tab. Exits with |
| 519 | non-zero status if problems are found. Not compatible with |
| 520 | --exit-code. |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 521 | </p> |
| 522 | </dd> |
| 523 | <dt> |
| 524 | --full-index |
| 525 | </dt> |
| 526 | <dd> |
| 527 | <p> |
| 528 | Instead of the first handful characters, show full |
| 529 | object name of pre- and post-image blob on the "index" |
| 530 | line when generating a patch format output. |
| 531 | </p> |
| 532 | </dd> |
| 533 | <dt> |
| 534 | --binary |
| 535 | </dt> |
| 536 | <dd> |
| 537 | <p> |
| 538 | In addition to --full-index, output "binary diff" that |
| 539 | can be applied with "git apply". |
| 540 | </p> |
| 541 | </dd> |
| 542 | <dt> |
| 543 | --abbrev[=<n>] |
| 544 | </dt> |
| 545 | <dd> |
| 546 | <p> |
| 547 | Instead of showing the full 40-byte hexadecimal object |
| 548 | name in diff-raw format output and diff-tree header |
| 549 | lines, show only handful hexdigits prefix. This is |
| 550 | independent of --full-index option above, which controls |
| 551 | the diff-patch output format. Non default number of |
| 552 | digits can be specified with --abbrev=<n>. |
| 553 | </p> |
| 554 | </dd> |
| 555 | <dt> |
| 556 | -B |
| 557 | </dt> |
| 558 | <dd> |
| 559 | <p> |
| 560 | Break complete rewrite changes into pairs of delete and create. |
| 561 | </p> |
| 562 | </dd> |
| 563 | <dt> |
| 564 | -M |
| 565 | </dt> |
| 566 | <dd> |
| 567 | <p> |
| 568 | Detect renames. |
| 569 | </p> |
| 570 | </dd> |
| 571 | <dt> |
| 572 | -C |
| 573 | </dt> |
| 574 | <dd> |
| 575 | <p> |
| 576 | Detect copies as well as renames. See also <tt>--find-copies-harder</tt>. |
| 577 | </p> |
| 578 | </dd> |
| 579 | <dt> |
| 580 | --diff-filter=[ACDMRTUXB*] |
| 581 | </dt> |
| 582 | <dd> |
| 583 | <p> |
| 584 | Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>), |
| 585 | Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their |
| 586 | type (mode) changed (<tt>T</tt>), are Unmerged (<tt>U</tt>), are |
| 587 | Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>). |
| 588 | Any combination of the filter characters may be used. |
| 589 | When <tt>*</tt> (All-or-none) is added to the combination, all |
| 590 | paths are selected if there is any file that matches |
| 591 | other criteria in the comparison; if there is no file |
| 592 | that matches other criteria, nothing is selected. |
| 593 | </p> |
| 594 | </dd> |
| 595 | <dt> |
| 596 | --find-copies-harder |
| 597 | </dt> |
| 598 | <dd> |
| 599 | <p> |
| 600 | For performance reasons, by default, <tt>-C</tt> option finds copies only |
| 601 | if the original file of the copy was modified in the same |
| 602 | changeset. This flag makes the command |
| 603 | inspect unmodified files as candidates for the source of |
| 604 | copy. This is a very expensive operation for large |
| 605 | projects, so use it with caution. Giving more than one |
| 606 | <tt>-C</tt> option has the same effect. |
| 607 | </p> |
| 608 | </dd> |
| 609 | <dt> |
| 610 | -l<num> |
| 611 | </dt> |
| 612 | <dd> |
| 613 | <p> |
| 614 | -M and -C options require O(n^2) processing time where n |
| 615 | is the number of potential rename/copy targets. This |
| 616 | option prevents rename/copy detection from running if |
| 617 | the number of rename/copy targets exceeds the specified |
| 618 | number. |
| 619 | </p> |
| 620 | </dd> |
| 621 | <dt> |
| 622 | -S<string> |
| 623 | </dt> |
| 624 | <dd> |
| 625 | <p> |
| 626 | Look for differences that contain the change in <string>. |
| 627 | </p> |
| 628 | </dd> |
| 629 | <dt> |
| 630 | --pickaxe-all |
| 631 | </dt> |
| 632 | <dd> |
| 633 | <p> |
| 634 | When -S finds a change, show all the changes in that |
| 635 | changeset, not just the files that contain the change |
| 636 | in <string>. |
| 637 | </p> |
| 638 | </dd> |
| 639 | <dt> |
| 640 | --pickaxe-regex |
| 641 | </dt> |
| 642 | <dd> |
| 643 | <p> |
| 644 | Make the <string> not a plain string but an extended POSIX |
| 645 | regex to match. |
| 646 | </p> |
| 647 | </dd> |
| 648 | <dt> |
| 649 | -O<orderfile> |
| 650 | </dt> |
| 651 | <dd> |
| 652 | <p> |
| 653 | Output the patch in the order specified in the |
| 654 | <orderfile>, which has one shell glob pattern per line. |
| 655 | </p> |
| 656 | </dd> |
| 657 | <dt> |
| 658 | -R |
| 659 | </dt> |
| 660 | <dd> |
| 661 | <p> |
| 662 | Swap two inputs; that is, show differences from index or |
| 663 | on-disk file to tree contents. |
| 664 | </p> |
| 665 | </dd> |
| 666 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 667 | --relative[=<path>] |
| 668 | </dt> |
| 669 | <dd> |
| 670 | <p> |
| 671 | When run from a subdirectory of the project, it can be |
| 672 | told to exclude changes outside the directory and show |
| 673 | pathnames relative to it with this option. When you are |
| 674 | not in a subdirectory (e.g. in a bare repository), you |
| 675 | can name which subdirectory to make the output relative |
| 676 | to by giving a <path> as an argument. |
| 677 | </p> |
| 678 | </dd> |
| 679 | <dt> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 680 | --text |
| 681 | </dt> |
| 682 | <dd> |
| 683 | <p> |
| 684 | Treat all files as text. |
| 685 | </p> |
| 686 | </dd> |
| 687 | <dt> |
| 688 | -a |
| 689 | </dt> |
| 690 | <dd> |
| 691 | <p> |
| 692 | Shorthand for "--text". |
| 693 | </p> |
| 694 | </dd> |
| 695 | <dt> |
| 696 | --ignore-space-at-eol |
| 697 | </dt> |
| 698 | <dd> |
| 699 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 700 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 701 | </p> |
| 702 | </dd> |
| 703 | <dt> |
| 704 | --ignore-space-change |
| 705 | </dt> |
| 706 | <dd> |
| 707 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 708 | Ignore changes in amount of whitespace. This ignores whitespace |
| 709 | at line end, and considers all other sequences of one or |
| 710 | more whitespace characters to be equivalent. |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 711 | </p> |
| 712 | </dd> |
| 713 | <dt> |
| 714 | -b |
| 715 | </dt> |
| 716 | <dd> |
| 717 | <p> |
| 718 | Shorthand for "--ignore-space-change". |
| 719 | </p> |
| 720 | </dd> |
| 721 | <dt> |
| 722 | --ignore-all-space |
| 723 | </dt> |
| 724 | <dd> |
| 725 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 726 | Ignore whitespace when comparing lines. This ignores |
| 727 | differences even if one line has whitespace where the other |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 728 | line has none. |
| 729 | </p> |
| 730 | </dd> |
| 731 | <dt> |
| 732 | -w |
| 733 | </dt> |
| 734 | <dd> |
| 735 | <p> |
| 736 | Shorthand for "--ignore-all-space". |
| 737 | </p> |
| 738 | </dd> |
| 739 | <dt> |
| 740 | --exit-code |
| 741 | </dt> |
| 742 | <dd> |
| 743 | <p> |
| 744 | Make the program exit with codes similar to diff(1). |
| 745 | That is, it exits with 1 if there were differences and |
| 746 | 0 means no differences. |
| 747 | </p> |
| 748 | </dd> |
| 749 | <dt> |
| 750 | --quiet |
| 751 | </dt> |
| 752 | <dd> |
| 753 | <p> |
| 754 | Disable all output of the program. Implies --exit-code. |
| 755 | </p> |
| 756 | </dd> |
| 757 | <dt> |
| 758 | --ext-diff |
| 759 | </dt> |
| 760 | <dd> |
| 761 | <p> |
| 762 | Allow an external diff helper to be executed. If you set an |
| 763 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 764 | to use this option with <a href="git-log.html">git-log(1)</a> and friends. |
| 765 | </p> |
| 766 | </dd> |
| 767 | <dt> |
| 768 | --no-ext-diff |
| 769 | </dt> |
| 770 | <dd> |
| 771 | <p> |
| 772 | Disallow external diff drivers. |
| 773 | </p> |
| 774 | </dd> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 775 | <dt> |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 776 | --ignore-submodules |
| 777 | </dt> |
| 778 | <dd> |
| 779 | <p> |
| 780 | Ignore changes to submodules in the diff generation. |
| 781 | </p> |
| 782 | </dd> |
| 783 | <dt> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 784 | --src-prefix=<prefix> |
| 785 | </dt> |
| 786 | <dd> |
| 787 | <p> |
| 788 | Show the given source prefix instead of "a/". |
| 789 | </p> |
| 790 | </dd> |
| 791 | <dt> |
| 792 | --dst-prefix=<prefix> |
| 793 | </dt> |
| 794 | <dd> |
| 795 | <p> |
| 796 | Show the given destination prefix instead of "b/". |
| 797 | </p> |
| 798 | </dd> |
| 799 | <dt> |
| 800 | --no-prefix |
| 801 | </dt> |
| 802 | <dd> |
| 803 | <p> |
| 804 | Do not show any source or destination prefix. |
| 805 | </p> |
| 806 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 807 | </dl></div> |
| 808 | <div class="para"><p>For more detailed explanation on these common options, see also |
| 809 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
| 810 | <div class="vlist"><dl> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 811 | <dt> |
| 812 | -<n> |
| 813 | </dt> |
| 814 | <dd> |
| 815 | <p> |
| 816 | Limits the number of commits to show. |
| 817 | </p> |
| 818 | </dd> |
| 819 | <dt> |
| 820 | <since>..<until> |
| 821 | </dt> |
| 822 | <dd> |
| 823 | <p> |
| 824 | Show only commits between the named two commits. When |
| 825 | either <since> or <until> is omitted, it defaults to |
| 826 | <tt>HEAD</tt>, i.e. the tip of the current branch. |
| 827 | For a more complete list of ways to spell <since> |
| 828 | and <until>, see "SPECIFYING REVISIONS" section in |
| 829 | <a href="git-rev-parse.html">git-rev-parse(1)</a>. |
| 830 | </p> |
| 831 | </dd> |
| 832 | <dt> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 833 | --decorate |
| 834 | </dt> |
| 835 | <dd> |
| 836 | <p> |
Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 837 | Print out the ref names of any commits that are shown. |
| 838 | </p> |
| 839 | </dd> |
| 840 | <dt> |
| 841 | --full-diff |
| 842 | </dt> |
| 843 | <dd> |
| 844 | <p> |
Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 845 | Without this flag, "git log -p <path>…" shows commits that |
Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 846 | touch the specified paths, and diffs about the same specified |
| 847 | paths. With this, the full diff is shown for commits that touch |
Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 848 | the specified paths; this means that "<path>…" limits only |
Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 849 | commits, and doesn't limit diff for those commits. |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 850 | </p> |
| 851 | </dd> |
| 852 | <dt> |
Junio C Hamano | 235d53f | 2007-07-13 00:25:15 | [diff] [blame] | 853 | --follow |
| 854 | </dt> |
| 855 | <dd> |
| 856 | <p> |
| 857 | Continue listing the history of a file beyond renames. |
| 858 | </p> |
| 859 | </dd> |
| 860 | <dt> |
Junio C Hamano | 024b6c6 | 2007-08-14 09:43:08 | [diff] [blame] | 861 | --log-size |
| 862 | </dt> |
| 863 | <dd> |
| 864 | <p> |
| 865 | Before the log message print out its size in bytes. Intended |
| 866 | mainly for porcelain tools consumption. If git is unable to |
| 867 | produce a valid value size is set to zero. |
| 868 | Note that only message is considered, if also a diff is shown |
| 869 | its size is not included. |
| 870 | </p> |
| 871 | </dd> |
| 872 | <dt> |
Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 873 | <path>… |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 874 | </dt> |
| 875 | <dd> |
| 876 | <p> |
Junio C Hamano | 85c7157 | 2008-07-28 00:03:31 | [diff] [blame] | 877 | Show only commits that affect any of the specified paths. |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 878 | </p> |
| 879 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 880 | </dl></div> |
| 881 | <h3 id="_commit_formatting">Commit Formatting</h3><div style="clear:left"></div> |
| 882 | <div class="vlist"><dl> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 883 | <dt> |
| 884 | --pretty[=<em><format></em>] |
| 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
| 888 | Pretty-print the contents of the commit logs in a given format, |
| 889 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| 890 | <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:<string></em>. |
| 891 | When omitted, the format defaults to <em>medium</em>. |
| 892 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 893 | <div class="para"><p>Note: you can specify the default pretty format in the repository |
| 894 | configuration (see <a href="git-config.html">git-config(1)</a>).</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 895 | </dd> |
| 896 | <dt> |
| 897 | --abbrev-commit |
| 898 | </dt> |
| 899 | <dd> |
| 900 | <p> |
| 901 | Instead of showing the full 40-byte hexadecimal commit object |
| 902 | name, show only handful hexdigits prefix. Non default number of |
| 903 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 904 | diff output, if it is displayed). |
| 905 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 906 | <div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for |
| 907 | people using 80-column terminals.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 908 | </dd> |
| 909 | <dt> |
| 910 | --encoding[=<encoding>] |
| 911 | </dt> |
| 912 | <dd> |
| 913 | <p> |
| 914 | The commit objects record the encoding used for the log message |
| 915 | in their encoding header; this option can be used to tell the |
| 916 | command to re-code the commit log message in the encoding |
| 917 | preferred by the user. For non plumbing commands this |
| 918 | defaults to UTF-8. |
| 919 | </p> |
| 920 | </dd> |
| 921 | <dt> |
| 922 | --relative-date |
| 923 | </dt> |
| 924 | <dd> |
| 925 | <p> |
| 926 | Synonym for <tt>--date=relative</tt>. |
| 927 | </p> |
| 928 | </dd> |
| 929 | <dt> |
Junio C Hamano | b713ff1 | 2008-05-24 01:12:30 | [diff] [blame] | 930 | --date={relative,local,default,iso,rfc,short} |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 931 | </dt> |
| 932 | <dd> |
| 933 | <p> |
| 934 | Only takes effect for dates shown in human-readable format, such |
Junio C Hamano | b713ff1 | 2008-05-24 01:12:30 | [diff] [blame] | 935 | as when using "--pretty". <tt>log.date</tt> config variable sets a default |
| 936 | value for log command's --date option. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 937 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 938 | <div class="para"><p><tt>--date=relative</tt> shows dates relative to the current time, |
| 939 | e.g. "2 hours ago".</p></div> |
| 940 | <div class="para"><p><tt>--date=local</tt> shows timestamps in user's local timezone.</p></div> |
| 941 | <div class="para"><p><tt>--date=iso</tt> (or <tt>--date=iso8601</tt>) shows timestamps in ISO 8601 format.</p></div> |
| 942 | <div class="para"><p><tt>--date=rfc</tt> (or <tt>--date=rfc2822</tt>) shows timestamps in RFC 2822 |
| 943 | format, often found in E-mail messages.</p></div> |
| 944 | <div class="para"><p><tt>--date=short</tt> shows only date but not time, in <tt>YYYY-MM-DD</tt> format.</p></div> |
| 945 | <div class="para"><p><tt>--date=default</tt> shows timestamps in the original timezone |
| 946 | (either committer's or author's).</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 947 | </dd> |
| 948 | <dt> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 949 | --parents |
| 950 | </dt> |
| 951 | <dd> |
| 952 | <p> |
| 953 | Print the parents of the commit. |
| 954 | </p> |
| 955 | </dd> |
| 956 | <dt> |
Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 957 | --children |
| 958 | </dt> |
| 959 | <dd> |
| 960 | <p> |
| 961 | Print the children of the commit. |
| 962 | </p> |
| 963 | </dd> |
| 964 | <dt> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 965 | --left-right |
| 966 | </dt> |
| 967 | <dd> |
| 968 | <p> |
| 969 | Mark which side of a symmetric diff a commit is reachable from. |
| 970 | Commits from the left side are prefixed with <tt><</tt> and those from |
| 971 | the right with <tt>></tt>. If combined with <tt>--boundary</tt>, those |
| 972 | commits are prefixed with <tt>-</tt>. |
| 973 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 974 | <div class="para"><p>For example, if you have this topology:</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 975 | <div class="listingblock"> |
| 976 | <div class="content"> |
| 977 | <pre><tt> y---b---b branch B |
| 978 | / \ / |
| 979 | / . |
| 980 | / / \ |
| 981 | o---x---a---a branch A</tt></pre> |
| 982 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 983 | <div class="para"><p>you would get an output line this:</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 984 | <div class="listingblock"> |
| 985 | <div class="content"> |
| 986 | <pre><tt> $ git rev-list --left-right --boundary --pretty=oneline A...B |
| 987 | |
| 988 | >bbbbbbb... 3rd on b |
| 989 | >bbbbbbb... 2nd on b |
| 990 | <aaaaaaa... 3rd on a |
| 991 | <aaaaaaa... 2nd on a |
| 992 | -yyyyyyy... 1st on b |
| 993 | -xxxxxxx... 1st on a</tt></pre> |
| 994 | </div></div> |
| 995 | </dd> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 996 | <dt> |
| 997 | --graph |
| 998 | </dt> |
| 999 | <dd> |
| 1000 | <p> |
| 1001 | Draw a text-based graphical representation of the commit history |
| 1002 | on the left hand side of the output. This may cause extra lines |
| 1003 | to be printed in between commits, in order for the graph history |
| 1004 | to be drawn properly. |
| 1005 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1006 | <div class="para"><p>This implies the <em>--topo-order</em> option by default, but the |
| 1007 | <em>--date-order</em> option may also be specified.</p></div> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 1008 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1009 | </dl></div> |
| 1010 | <h3 id="_diff_formatting">Diff Formatting</h3><div style="clear:left"></div> |
| 1011 | <div class="para"><p>Below are listed options that control the formatting of diff output. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1012 | Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1013 | options may be given. See <a href="git-diff-files.html">git-diff-files(1)</a> for more options.</p></div> |
| 1014 | <div class="vlist"><dl> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1015 | <dt> |
| 1016 | -c |
| 1017 | </dt> |
| 1018 | <dd> |
| 1019 | <p> |
| 1020 | This flag changes the way a merge commit is displayed. It shows |
| 1021 | the differences from each of the parents to the merge result |
| 1022 | simultaneously instead of showing pairwise diff between a parent |
| 1023 | and the result one at a time. Furthermore, it lists only files |
| 1024 | which were modified from all parents. |
| 1025 | </p> |
| 1026 | </dd> |
| 1027 | <dt> |
| 1028 | --cc |
| 1029 | </dt> |
| 1030 | <dd> |
| 1031 | <p> |
| 1032 | This flag implies the <em>-c</em> options and further compresses the |
Junio C Hamano | ccc2f76 | 2008-07-24 04:03:33 | [diff] [blame] | 1033 | patch output by omitting uninteresting hunks whose contents in |
| 1034 | the parents have only two variants and the merge result picks |
| 1035 | one of them without modification. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1036 | </p> |
| 1037 | </dd> |
| 1038 | <dt> |
| 1039 | -r |
| 1040 | </dt> |
| 1041 | <dd> |
| 1042 | <p> |
| 1043 | Show recursive diffs. |
| 1044 | </p> |
| 1045 | </dd> |
| 1046 | <dt> |
| 1047 | -t |
| 1048 | </dt> |
| 1049 | <dd> |
| 1050 | <p> |
| 1051 | Show the tree objects in the diff output. This implies <em>-r</em>. |
| 1052 | </p> |
| 1053 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1054 | </dl></div> |
| 1055 | <h3 id="_commit_limiting">Commit Limiting</h3><div style="clear:left"></div> |
| 1056 | <div class="para"><p>Besides specifying a range of commits that should be listed using the |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1057 | special notations explained in the description, additional commit |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1058 | limiting may be applied.</p></div> |
| 1059 | <div class="vlist"><dl> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1060 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1061 | -n <em>number</em> |
| 1062 | </dt> |
| 1063 | <dt> |
| 1064 | --max-count=<em>number</em> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1065 | </dt> |
| 1066 | <dd> |
| 1067 | <p> |
| 1068 | Limit the number of commits output. |
| 1069 | </p> |
| 1070 | </dd> |
| 1071 | <dt> |
| 1072 | --skip=<em>number</em> |
| 1073 | </dt> |
| 1074 | <dd> |
| 1075 | <p> |
| 1076 | Skip <em>number</em> commits before starting to show the commit output. |
| 1077 | </p> |
| 1078 | </dd> |
| 1079 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1080 | --since=<em>date</em> |
| 1081 | </dt> |
| 1082 | <dt> |
| 1083 | --after=<em>date</em> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1084 | </dt> |
| 1085 | <dd> |
| 1086 | <p> |
| 1087 | Show commits more recent than a specific date. |
| 1088 | </p> |
| 1089 | </dd> |
| 1090 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1091 | --until=<em>date</em> |
| 1092 | </dt> |
| 1093 | <dt> |
| 1094 | --before=<em>date</em> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1095 | </dt> |
| 1096 | <dd> |
| 1097 | <p> |
| 1098 | Show commits older than a specific date. |
| 1099 | </p> |
| 1100 | </dd> |
| 1101 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1102 | --author=<em>pattern</em> |
| 1103 | </dt> |
| 1104 | <dt> |
| 1105 | --committer=<em>pattern</em> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1106 | </dt> |
| 1107 | <dd> |
| 1108 | <p> |
| 1109 | Limit the commits output to ones with author/committer |
| 1110 | header lines that match the specified pattern (regular expression). |
| 1111 | </p> |
| 1112 | </dd> |
| 1113 | <dt> |
| 1114 | --grep=<em>pattern</em> |
| 1115 | </dt> |
| 1116 | <dd> |
| 1117 | <p> |
| 1118 | Limit the commits output to ones with log message that |
| 1119 | matches the specified pattern (regular expression). |
| 1120 | </p> |
| 1121 | </dd> |
| 1122 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1123 | -i |
| 1124 | </dt> |
| 1125 | <dt> |
| 1126 | --regexp-ignore-case |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1127 | </dt> |
| 1128 | <dd> |
| 1129 | <p> |
| 1130 | Match the regexp limiting patterns without regard to letters case. |
| 1131 | </p> |
| 1132 | </dd> |
| 1133 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1134 | -E |
| 1135 | </dt> |
| 1136 | <dt> |
| 1137 | --extended-regexp |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1138 | </dt> |
| 1139 | <dd> |
| 1140 | <p> |
| 1141 | Consider the limiting patterns to be extended regular expressions |
| 1142 | instead of the default basic regular expressions. |
| 1143 | </p> |
| 1144 | </dd> |
| 1145 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1146 | -F |
| 1147 | </dt> |
| 1148 | <dt> |
| 1149 | --fixed-strings |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1150 | </dt> |
| 1151 | <dd> |
| 1152 | <p> |
| 1153 | Consider the limiting patterns to be fixed strings (don't interpret |
| 1154 | pattern as a regular expression). |
| 1155 | </p> |
| 1156 | </dd> |
| 1157 | <dt> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1158 | --remove-empty |
| 1159 | </dt> |
| 1160 | <dd> |
| 1161 | <p> |
| 1162 | Stop when a given path disappears from the tree. |
| 1163 | </p> |
| 1164 | </dd> |
| 1165 | <dt> |
| 1166 | --full-history |
| 1167 | </dt> |
| 1168 | <dd> |
| 1169 | <p> |
| 1170 | Show also parts of history irrelevant to current state of a given |
| 1171 | path. This turns off history simplification, which removed merges |
| 1172 | which didn't change anything at all at some child. It will still actually |
| 1173 | simplify away merges that didn't change anything at all into either |
| 1174 | child. |
| 1175 | </p> |
| 1176 | </dd> |
| 1177 | <dt> |
| 1178 | --no-merges |
| 1179 | </dt> |
| 1180 | <dd> |
| 1181 | <p> |
| 1182 | Do not print commits with more than one parent. |
| 1183 | </p> |
| 1184 | </dd> |
| 1185 | <dt> |
| 1186 | --first-parent |
| 1187 | </dt> |
| 1188 | <dd> |
| 1189 | <p> |
| 1190 | Follow only the first parent commit upon seeing a merge |
| 1191 | commit. This option can give a better overview when |
| 1192 | viewing the evolution of a particular topic branch, |
| 1193 | because merges into a topic branch tend to be only about |
| 1194 | adjusting to updated upstream from time to time, and |
| 1195 | this option allows you to ignore the individual commits |
| 1196 | brought in to your history by such a merge. |
| 1197 | </p> |
| 1198 | </dd> |
| 1199 | <dt> |
| 1200 | --not |
| 1201 | </dt> |
| 1202 | <dd> |
| 1203 | <p> |
| 1204 | Reverses the meaning of the <em>^</em> prefix (or lack thereof) |
| 1205 | for all following revision specifiers, up to the next <em>--not</em>. |
| 1206 | </p> |
| 1207 | </dd> |
| 1208 | <dt> |
| 1209 | --all |
| 1210 | </dt> |
| 1211 | <dd> |
| 1212 | <p> |
| 1213 | Pretend as if all the refs in <tt>$GIT_DIR/refs/</tt> are listed on the |
| 1214 | command line as <em><commit></em>. |
| 1215 | </p> |
| 1216 | </dd> |
| 1217 | <dt> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1218 | --cherry-pick |
| 1219 | </dt> |
| 1220 | <dd> |
| 1221 | <p> |
| 1222 | Omit any commit that introduces the same change as |
| 1223 | another commit on the "other side" when the set of |
| 1224 | commits are limited with symmetric difference.<br /> |
| 1225 | For example, if you have two branches, <tt>A</tt> and <tt>B</tt>, a usual way |
| 1226 | to list all commits on only one side of them is with |
| 1227 | <tt>--left-right</tt>, like the example above in the description of |
| 1228 | that option. It however shows the commits that were cherry-picked |
| 1229 | from the other branch (for example, "3rd on b" may be cherry-picked |
| 1230 | from branch A). With this option, such pairs of commits are |
| 1231 | excluded from the output. |
| 1232 | </p> |
| 1233 | </dd> |
| 1234 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1235 | -g |
| 1236 | </dt> |
| 1237 | <dt> |
| 1238 | --walk-reflogs |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1239 | </dt> |
| 1240 | <dd> |
| 1241 | <p> |
| 1242 | Instead of walking the commit ancestry chain, walk |
| 1243 | reflog entries from the most recent one to older ones. |
| 1244 | When this option is used you cannot specify commits to |
| 1245 | exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>, |
| 1246 | nor <em>commit1…commit2</em> notations cannot be used).<br /> |
| 1247 | With <em>--pretty</em> format other than oneline (for obvious reasons), |
| 1248 | this causes the output to have two extra lines of information |
| 1249 | taken from the reflog. By default, <em>commit@{Nth}</em> notation is |
| 1250 | used in the output. When the starting commit is specified as |
Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame^] | 1251 | <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1252 | instead. Under <em>--pretty=oneline</em>, the commit message is |
| 1253 | prefixed with this information on the same line. |
Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame^] | 1254 | This option cannot be combined with <em>--reverse</em>. |
| 1255 | See also <a href="git-reflog.html">git-reflog(1)</a>. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1256 | </p> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1257 | </dd> |
| 1258 | <dt> |
| 1259 | --merge |
| 1260 | </dt> |
| 1261 | <dd> |
| 1262 | <p> |
| 1263 | After a failed merge, show refs that touch files having a |
| 1264 | conflict and don't exist on all heads to merge. |
| 1265 | </p> |
| 1266 | </dd> |
| 1267 | <dt> |
| 1268 | --boundary |
| 1269 | </dt> |
| 1270 | <dd> |
| 1271 | <p> |
| 1272 | Output uninteresting commits at the boundary, which are usually |
| 1273 | not shown. |
| 1274 | </p> |
| 1275 | </dd> |
| 1276 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1277 | --dense |
| 1278 | </dt> |
| 1279 | <dt> |
| 1280 | --sparse |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1281 | </dt> |
| 1282 | <dd> |
| 1283 | <p> |
| 1284 | When optional paths are given, the default behaviour (<em>--dense</em>) is to |
| 1285 | only output commits that changes at least one of them, and also ignore |
| 1286 | merges that do not touch the given paths. |
| 1287 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1288 | <div class="para"><p>Use the <em>--sparse</em> flag to makes the command output all eligible commits |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1289 | (still subject to count and age limitation), but apply merge |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1290 | simplification nevertheless.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1291 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1292 | </dl></div> |
| 1293 | <h3 id="_commit_ordering">Commit Ordering</h3><div style="clear:left"></div> |
| 1294 | <div class="para"><p>By default, the commits are shown in reverse chronological order.</p></div> |
| 1295 | <div class="vlist"><dl> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1296 | <dt> |
| 1297 | --topo-order |
| 1298 | </dt> |
| 1299 | <dd> |
| 1300 | <p> |
| 1301 | This option makes them appear in topological order (i.e. |
| 1302 | descendant commits are shown before their parents). |
| 1303 | </p> |
| 1304 | </dd> |
| 1305 | <dt> |
| 1306 | --date-order |
| 1307 | </dt> |
| 1308 | <dd> |
| 1309 | <p> |
| 1310 | This option is similar to <em>--topo-order</em> in the sense that no |
| 1311 | parent comes before all of its children, but otherwise things |
| 1312 | are still ordered in the commit timestamp order. |
| 1313 | </p> |
| 1314 | </dd> |
| 1315 | <dt> |
| 1316 | --reverse |
| 1317 | </dt> |
| 1318 | <dd> |
| 1319 | <p> |
| 1320 | Output the commits in reverse order. |
| 1321 | Cannot be combined with <em>--walk-reflogs</em>. |
| 1322 | </p> |
| 1323 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1324 | </dl></div> |
| 1325 | <h3 id="_object_traversal">Object Traversal</h3><div style="clear:left"></div> |
| 1326 | <div class="para"><p>These options are mostly targeted for packing of git repositories.</p></div> |
| 1327 | <div class="vlist"><dl> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1328 | <dt> |
| 1329 | --objects |
| 1330 | </dt> |
| 1331 | <dd> |
| 1332 | <p> |
| 1333 | Print the object IDs of any object referenced by the listed |
| 1334 | commits. <em>--objects foo ^bar</em> thus means "send me |
| 1335 | all object IDs which I need to download if I have the commit |
| 1336 | object <em>bar</em>, but not <em>foo</em>". |
| 1337 | </p> |
| 1338 | </dd> |
| 1339 | <dt> |
| 1340 | --objects-edge |
| 1341 | </dt> |
| 1342 | <dd> |
| 1343 | <p> |
| 1344 | Similar to <em>--objects</em>, but also print the IDs of excluded |
| 1345 | commits prefixed with a "-" character. This is used by |
| 1346 | <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records |
| 1347 | objects in deltified form based on objects contained in these |
| 1348 | excluded commits to reduce network traffic. |
| 1349 | </p> |
| 1350 | </dd> |
| 1351 | <dt> |
| 1352 | --unpacked |
| 1353 | </dt> |
| 1354 | <dd> |
| 1355 | <p> |
| 1356 | Only useful with <em>--objects</em>; print the object IDs that are not |
| 1357 | in packs. |
| 1358 | </p> |
| 1359 | </dd> |
| 1360 | <dt> |
| 1361 | --no-walk |
| 1362 | </dt> |
| 1363 | <dd> |
| 1364 | <p> |
| 1365 | Only show the given revs, but do not traverse their ancestors. |
| 1366 | </p> |
| 1367 | </dd> |
| 1368 | <dt> |
| 1369 | --do-walk |
| 1370 | </dt> |
| 1371 | <dd> |
| 1372 | <p> |
| 1373 | Overrides a previous --no-walk. |
| 1374 | </p> |
| 1375 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1376 | </dl></div> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1377 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1378 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1379 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1380 | <div class="para"><p>If the commit is a merge, and if the pretty-format |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1381 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 1382 | inserted before the <em>Author:</em> line. This line begins with |
| 1383 | "Merge: " and the sha1s of ancestral commits are printed, |
| 1384 | separated by spaces. Note that the listed commits may not |
| 1385 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 1386 | have limited your view of history: for example, if you are |
| 1387 | only interested in changes related to a certain directory or |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1388 | file.</p></div> |
| 1389 | <div class="para"><p>Here are some additional details for each format:</p></div> |
| 1390 | <div class="ilist"><ul> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1391 | <li> |
| 1392 | <p> |
| 1393 | <em>oneline</em> |
| 1394 | </p> |
| 1395 | <div class="literalblock"> |
| 1396 | <div class="content"> |
| 1397 | <pre><tt><sha1> <title line></tt></pre> |
| 1398 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1399 | <div class="para"><p>This is designed to be as compact as possible.</p></div> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1400 | </li> |
| 1401 | <li> |
| 1402 | <p> |
| 1403 | <em>short</em> |
| 1404 | </p> |
| 1405 | <div class="literalblock"> |
| 1406 | <div class="content"> |
| 1407 | <pre><tt>commit <sha1> |
| 1408 | Author: <author></tt></pre> |
| 1409 | </div></div> |
| 1410 | <div class="literalblock"> |
| 1411 | <div class="content"> |
| 1412 | <pre><tt><title line></tt></pre> |
| 1413 | </div></div> |
| 1414 | </li> |
| 1415 | <li> |
| 1416 | <p> |
| 1417 | <em>medium</em> |
| 1418 | </p> |
| 1419 | <div class="literalblock"> |
| 1420 | <div class="content"> |
| 1421 | <pre><tt>commit <sha1> |
| 1422 | Author: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1423 | Date: <author date></tt></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1424 | </div></div> |
| 1425 | <div class="literalblock"> |
| 1426 | <div class="content"> |
| 1427 | <pre><tt><title line></tt></pre> |
| 1428 | </div></div> |
| 1429 | <div class="literalblock"> |
| 1430 | <div class="content"> |
| 1431 | <pre><tt><full commit message></tt></pre> |
| 1432 | </div></div> |
| 1433 | </li> |
| 1434 | <li> |
| 1435 | <p> |
| 1436 | <em>full</em> |
| 1437 | </p> |
| 1438 | <div class="literalblock"> |
| 1439 | <div class="content"> |
| 1440 | <pre><tt>commit <sha1> |
| 1441 | Author: <author> |
| 1442 | Commit: <committer></tt></pre> |
| 1443 | </div></div> |
| 1444 | <div class="literalblock"> |
| 1445 | <div class="content"> |
| 1446 | <pre><tt><title line></tt></pre> |
| 1447 | </div></div> |
| 1448 | <div class="literalblock"> |
| 1449 | <div class="content"> |
| 1450 | <pre><tt><full commit message></tt></pre> |
| 1451 | </div></div> |
| 1452 | </li> |
| 1453 | <li> |
| 1454 | <p> |
| 1455 | <em>fuller</em> |
| 1456 | </p> |
| 1457 | <div class="literalblock"> |
| 1458 | <div class="content"> |
| 1459 | <pre><tt>commit <sha1> |
| 1460 | Author: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1461 | AuthorDate: <author date> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1462 | Commit: <committer> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1463 | CommitDate: <committer date></tt></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1464 | </div></div> |
| 1465 | <div class="literalblock"> |
| 1466 | <div class="content"> |
| 1467 | <pre><tt><title line></tt></pre> |
| 1468 | </div></div> |
| 1469 | <div class="literalblock"> |
| 1470 | <div class="content"> |
| 1471 | <pre><tt><full commit message></tt></pre> |
| 1472 | </div></div> |
| 1473 | </li> |
| 1474 | <li> |
| 1475 | <p> |
| 1476 | <em>email</em> |
| 1477 | </p> |
| 1478 | <div class="literalblock"> |
| 1479 | <div class="content"> |
| 1480 | <pre><tt>From <sha1> <date> |
| 1481 | From: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1482 | Date: <author date> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1483 | Subject: [PATCH] <title line></tt></pre> |
| 1484 | </div></div> |
| 1485 | <div class="literalblock"> |
| 1486 | <div class="content"> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1487 | <pre><tt><full commit message></tt></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1488 | </div></div> |
| 1489 | </li> |
| 1490 | <li> |
| 1491 | <p> |
| 1492 | <em>raw</em> |
| 1493 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1494 | <div class="para"><p>The <em>raw</em> format shows the entire commit exactly as |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1495 | stored in the commit object. Notably, the SHA1s are |
| 1496 | displayed in full, regardless of whether --abbrev or |
| 1497 | --no-abbrev are used, and <em>parents</em> information show the |
| 1498 | true parent commits, without taking grafts nor history |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1499 | simplification into account.</p></div> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1500 | </li> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1501 | <li> |
| 1502 | <p> |
| 1503 | <em>format:</em> |
| 1504 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1505 | <div class="para"><p>The <em>format:</em> format allows you to specify which information |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1506 | you want to show. It works a little bit like printf format, |
| 1507 | with the notable exception that you get a newline with <em>%n</em> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1508 | instead of <em>\n</em>.</p></div> |
| 1509 | <div class="para"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em> |
| 1510 | would show something like this:</p></div> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1511 | <div class="listingblock"> |
| 1512 | <div class="content"> |
| 1513 | <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 1514 | The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< |
| 1515 | </tt></pre> |
| 1516 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1517 | <div class="para"><p>The placeholders are:</p></div> |
| 1518 | <div class="ilist"><ul> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1519 | <li> |
| 1520 | <p> |
| 1521 | <em>%H</em>: commit hash |
| 1522 | </p> |
| 1523 | </li> |
| 1524 | <li> |
| 1525 | <p> |
| 1526 | <em>%h</em>: abbreviated commit hash |
| 1527 | </p> |
| 1528 | </li> |
| 1529 | <li> |
| 1530 | <p> |
| 1531 | <em>%T</em>: tree hash |
| 1532 | </p> |
| 1533 | </li> |
| 1534 | <li> |
| 1535 | <p> |
| 1536 | <em>%t</em>: abbreviated tree hash |
| 1537 | </p> |
| 1538 | </li> |
| 1539 | <li> |
| 1540 | <p> |
| 1541 | <em>%P</em>: parent hashes |
| 1542 | </p> |
| 1543 | </li> |
| 1544 | <li> |
| 1545 | <p> |
| 1546 | <em>%p</em>: abbreviated parent hashes |
| 1547 | </p> |
| 1548 | </li> |
| 1549 | <li> |
| 1550 | <p> |
| 1551 | <em>%an</em>: author name |
| 1552 | </p> |
| 1553 | </li> |
| 1554 | <li> |
| 1555 | <p> |
Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 1556 | <em>%aN</em>: author name (respecting .mailmap) |
| 1557 | </p> |
| 1558 | </li> |
| 1559 | <li> |
| 1560 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1561 | <em>%ae</em>: author email |
| 1562 | </p> |
| 1563 | </li> |
| 1564 | <li> |
| 1565 | <p> |
| 1566 | <em>%ad</em>: author date |
| 1567 | </p> |
| 1568 | </li> |
| 1569 | <li> |
| 1570 | <p> |
| 1571 | <em>%aD</em>: author date, RFC2822 style |
| 1572 | </p> |
| 1573 | </li> |
| 1574 | <li> |
| 1575 | <p> |
| 1576 | <em>%ar</em>: author date, relative |
| 1577 | </p> |
| 1578 | </li> |
| 1579 | <li> |
| 1580 | <p> |
| 1581 | <em>%at</em>: author date, UNIX timestamp |
| 1582 | </p> |
| 1583 | </li> |
| 1584 | <li> |
| 1585 | <p> |
Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1586 | <em>%ai</em>: author date, ISO 8601 format |
| 1587 | </p> |
| 1588 | </li> |
| 1589 | <li> |
| 1590 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1591 | <em>%cn</em>: committer name |
| 1592 | </p> |
| 1593 | </li> |
| 1594 | <li> |
| 1595 | <p> |
Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 1596 | <em>%cN</em>: committer name (respecting .mailmap) |
| 1597 | </p> |
| 1598 | </li> |
| 1599 | <li> |
| 1600 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1601 | <em>%ce</em>: committer email |
| 1602 | </p> |
| 1603 | </li> |
| 1604 | <li> |
| 1605 | <p> |
| 1606 | <em>%cd</em>: committer date |
| 1607 | </p> |
| 1608 | </li> |
| 1609 | <li> |
| 1610 | <p> |
| 1611 | <em>%cD</em>: committer date, RFC2822 style |
| 1612 | </p> |
| 1613 | </li> |
| 1614 | <li> |
| 1615 | <p> |
| 1616 | <em>%cr</em>: committer date, relative |
| 1617 | </p> |
| 1618 | </li> |
| 1619 | <li> |
| 1620 | <p> |
| 1621 | <em>%ct</em>: committer date, UNIX timestamp |
| 1622 | </p> |
| 1623 | </li> |
| 1624 | <li> |
| 1625 | <p> |
Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1626 | <em>%ci</em>: committer date, ISO 8601 format |
| 1627 | </p> |
| 1628 | </li> |
| 1629 | <li> |
| 1630 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1631 | <em>%e</em>: encoding |
| 1632 | </p> |
| 1633 | </li> |
| 1634 | <li> |
| 1635 | <p> |
| 1636 | <em>%s</em>: subject |
| 1637 | </p> |
| 1638 | </li> |
| 1639 | <li> |
| 1640 | <p> |
| 1641 | <em>%b</em>: body |
| 1642 | </p> |
| 1643 | </li> |
| 1644 | <li> |
| 1645 | <p> |
| 1646 | <em>%Cred</em>: switch color to red |
| 1647 | </p> |
| 1648 | </li> |
| 1649 | <li> |
| 1650 | <p> |
| 1651 | <em>%Cgreen</em>: switch color to green |
| 1652 | </p> |
| 1653 | </li> |
| 1654 | <li> |
| 1655 | <p> |
| 1656 | <em>%Cblue</em>: switch color to blue |
| 1657 | </p> |
| 1658 | </li> |
| 1659 | <li> |
| 1660 | <p> |
| 1661 | <em>%Creset</em>: reset color |
| 1662 | </p> |
| 1663 | </li> |
| 1664 | <li> |
| 1665 | <p> |
Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 1666 | <em>%m</em>: left, right or boundary mark |
| 1667 | </p> |
| 1668 | </li> |
| 1669 | <li> |
| 1670 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1671 | <em>%n</em>: newline |
| 1672 | </p> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1673 | </li> |
Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 1674 | <li> |
| 1675 | <p> |
| 1676 | <em>%x00</em>: print a byte from a hex code |
| 1677 | </p> |
| 1678 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1679 | </ul></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1680 | </li> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1681 | <li> |
| 1682 | <p> |
| 1683 | <em>tformat:</em> |
| 1684 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1685 | <div class="para"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1686 | provides "terminator" semantics instead of "separator" semantics. In |
| 1687 | other words, each commit has the message terminator character (usually a |
| 1688 | newline) appended, rather than a separator placed between entries. |
| 1689 | This means that the final entry of a single-line format will be properly |
| 1690 | terminated with a new line, just as the "oneline" format does. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1691 | For example:</p></div> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1692 | <div class="listingblock"> |
| 1693 | <div class="content"> |
| 1694 | <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \ |
| 1695 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1696 | 4da45be |
| 1697 | 7134973 -- NO NEWLINE |
| 1698 | |
| 1699 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 1700 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1701 | 4da45be |
| 1702 | 7134973</tt></pre> |
| 1703 | </div></div> |
| 1704 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1705 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1706 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1707 | <h2 id="_generating_patches_with_p">Generating patches with -p</h2> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1708 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1709 | <div class="para"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1710 | with a <em>-p</em> option, "git diff" without the <em>--raw</em> option, or |
| 1711 | "git log" with the "-p" option, they |
| 1712 | do not produce the output described above; instead they produce a |
| 1713 | patch file. You can customize the creation of such patches via the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1714 | GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div> |
| 1715 | <div class="para"><p>What the -p option produces is slightly different from the traditional |
| 1716 | diff format.</p></div> |
| 1717 | <div class="olist"><ol> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1718 | <li> |
| 1719 | <p> |
| 1720 | It is preceded with a "git diff" header, that looks like |
| 1721 | this: |
| 1722 | </p> |
| 1723 | <div class="literalblock"> |
| 1724 | <div class="content"> |
| 1725 | <pre><tt>diff --git a/file1 b/file2</tt></pre> |
| 1726 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1727 | <div class="para"><p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1728 | involved. Especially, even for a creation or a deletion, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1729 | <tt>/dev/null</tt> is <em>not</em> used in place of <tt>a/</tt> or <tt>b/</tt> filenames.</p></div> |
| 1730 | <div class="para"><p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1731 | name of the source file of the rename/copy and the name of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1732 | the file that rename/copy produces, respectively.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1733 | </li> |
| 1734 | <li> |
| 1735 | <p> |
| 1736 | It is followed by one or more extended header lines: |
| 1737 | </p> |
| 1738 | <div class="literalblock"> |
| 1739 | <div class="content"> |
| 1740 | <pre><tt>old mode <mode> |
| 1741 | new mode <mode> |
| 1742 | deleted file mode <mode> |
| 1743 | new file mode <mode> |
| 1744 | copy from <path> |
| 1745 | copy to <path> |
| 1746 | rename from <path> |
| 1747 | rename to <path> |
| 1748 | similarity index <number> |
| 1749 | dissimilarity index <number> |
| 1750 | index <hash>..<hash> <mode></tt></pre> |
| 1751 | </div></div> |
| 1752 | </li> |
| 1753 | <li> |
| 1754 | <p> |
| 1755 | TAB, LF, double quote and backslash characters in pathnames |
| 1756 | are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and <tt>\\</tt>, respectively. |
| 1757 | If there is need for such substitution then the whole |
| 1758 | pathname is put in double quotes. |
| 1759 | </p> |
| 1760 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1761 | </ol></div> |
| 1762 | <div class="para"><p>The similarity index is the percentage of unchanged lines, and |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1763 | the dissimilarity index is the percentage of changed lines. It |
| 1764 | is a rounded down integer, followed by a percent sign. The |
| 1765 | similarity index value of 100% is thus reserved for two equal |
| 1766 | files, while 100% dissimilarity means that no line from the old |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1767 | file made it into the new one.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1768 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1769 | <h2 id="_combined_diff_format">combined diff format</h2> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1770 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1771 | <div class="para"><p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1772 | <em>--cc</em> option to produce <em>combined diff</em>. For showing a merge commit |
| 1773 | with "git log -p", this is the default format. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1774 | A <em>combined diff</em> format looks like this:</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1775 | <div class="listingblock"> |
| 1776 | <div class="content"> |
| 1777 | <pre><tt>diff --combined describe.c |
| 1778 | index fabadb8,cc95eb0..4866510 |
| 1779 | --- a/describe.c |
| 1780 | +++ b/describe.c |
| 1781 | @@@ -98,20 -98,12 +98,20 @@@ |
| 1782 | return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; |
| 1783 | } |
| 1784 | |
| 1785 | - static void describe(char *arg) |
| 1786 | -static void describe(struct commit *cmit, int last_one) |
| 1787 | ++static void describe(char *arg, int last_one) |
| 1788 | { |
| 1789 | + unsigned char sha1[20]; |
| 1790 | + struct commit *cmit; |
| 1791 | struct commit_list *list; |
| 1792 | static int initialized = 0; |
| 1793 | struct commit_name *n; |
| 1794 | |
| 1795 | + if (get_sha1(arg, sha1) < 0) |
| 1796 | + usage(describe_usage); |
| 1797 | + cmit = lookup_commit_reference(sha1); |
| 1798 | + if (!cmit) |
| 1799 | + usage(describe_usage); |
| 1800 | + |
| 1801 | if (!initialized) { |
| 1802 | initialized = 1; |
| 1803 | for_each_ref(get_name);</tt></pre> |
| 1804 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1805 | <div class="olist"><ol> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1806 | <li> |
| 1807 | <p> |
| 1808 | It is preceded with a "git diff" header, that looks like |
| 1809 | this (when <em>-c</em> option is used): |
| 1810 | </p> |
| 1811 | <div class="literalblock"> |
| 1812 | <div class="content"> |
| 1813 | <pre><tt>diff --combined file</tt></pre> |
| 1814 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1815 | <div class="para"><p>or like this (when <em>--cc</em> option is used):</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1816 | <div class="literalblock"> |
| 1817 | <div class="content"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 1818 | <pre><tt>diff --cc file</tt></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1819 | </div></div> |
| 1820 | </li> |
| 1821 | <li> |
| 1822 | <p> |
| 1823 | It is followed by one or more extended header lines |
| 1824 | (this example shows a merge with two parents): |
| 1825 | </p> |
| 1826 | <div class="literalblock"> |
| 1827 | <div class="content"> |
| 1828 | <pre><tt>index <hash>,<hash>..<hash> |
| 1829 | mode <mode>,<mode>..<mode> |
| 1830 | new file mode <mode> |
| 1831 | deleted file mode <mode>,<mode></tt></pre> |
| 1832 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1833 | <div class="para"><p>The <tt>mode <mode>,<mode>..<mode></tt> line appears only if at least one of |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1834 | the <mode> is different from the rest. Extended headers with |
| 1835 | information about detected contents movement (renames and |
| 1836 | copying detection) are designed to work with diff of two |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1837 | <tree-ish> and are not used by combined diff format.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1838 | </li> |
| 1839 | <li> |
| 1840 | <p> |
| 1841 | It is followed by two-line from-file/to-file header |
| 1842 | </p> |
| 1843 | <div class="literalblock"> |
| 1844 | <div class="content"> |
| 1845 | <pre><tt>--- a/file |
| 1846 | +++ b/file</tt></pre> |
| 1847 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1848 | <div class="para"><p>Similar to two-line header for traditional <em>unified</em> diff |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1849 | format, <tt>/dev/null</tt> is used to signal created or deleted |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1850 | files.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1851 | </li> |
| 1852 | <li> |
| 1853 | <p> |
| 1854 | Chunk header format is modified to prevent people from |
| 1855 | accidentally feeding it to <tt>patch -p1</tt>. Combined diff format |
| 1856 | was created for review of merge commit changes, and was not |
| 1857 | meant for apply. The change is similar to the change in the |
| 1858 | extended <em>index</em> header: |
| 1859 | </p> |
| 1860 | <div class="literalblock"> |
| 1861 | <div class="content"> |
| 1862 | <pre><tt>@@@ <from-file-range> <from-file-range> <to-file-range> @@@</tt></pre> |
| 1863 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1864 | <div class="para"><p>There are (number of parents + 1) <tt>@</tt> characters in the chunk |
| 1865 | header for combined diff format.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1866 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1867 | </ol></div> |
| 1868 | <div class="para"><p>Unlike the traditional <em>unified</em> diff format, which shows two |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1869 | files A and B with a single column that has <tt>-</tt> (minus — |
| 1870 | appears in A but removed in B), <tt>+</tt> (plus — missing in A but |
| 1871 | added to B), or <tt>" "</tt> (space — unchanged) prefix, this format |
| 1872 | compares two or more files file1, file2,… with one file X, and |
| 1873 | shows how X differs from each of fileN. One column for each of |
| 1874 | fileN is prepended to the output line to note how X's line is |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1875 | different from it.</p></div> |
| 1876 | <div class="para"><p>A <tt>-</tt> character in the column N means that the line appears in |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1877 | fileN but it does not appear in the result. A <tt>+</tt> character |
| 1878 | in the column N means that the line appears in the last file, |
| 1879 | and fileN does not have that line (in other words, the line was |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1880 | added, from the point of view of that parent).</p></div> |
| 1881 | <div class="para"><p>In the above example output, the function signature was changed |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1882 | from both files (hence two <tt>-</tt> removals from both file1 and |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1883 | file2, plus <tt><tt>+</tt> to mean one line that was added does not appear |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1884 | in either file1 nor file2). Also two other lines are the same |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1885 | from file1 but do not appear in file2 (hence prefixed with <tt> </tt></tt>).</p></div> |
| 1886 | <div class="para"><p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1887 | merge commit with the merge result (i.e. file1..fileN are the |
| 1888 | parents). When shown by <tt>git diff-files -c</tt>, it compares the |
| 1889 | two unresolved merge parents with the working tree file |
| 1890 | (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1891 | "their version").</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 1892 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1893 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1894 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1895 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1896 | <dt> |
| 1897 | git log --no-merges |
| 1898 | </dt> |
| 1899 | <dd> |
| 1900 | <p> |
| 1901 | Show the whole commit history, but skip any merges |
| 1902 | </p> |
| 1903 | </dd> |
| 1904 | <dt> |
| 1905 | git log v2.6.12.. include/scsi drivers/scsi |
| 1906 | </dt> |
| 1907 | <dd> |
| 1908 | <p> |
| 1909 | Show all commits since version <em>v2.6.12</em> that changed any file |
| 1910 | in the include/scsi or drivers/scsi subdirectories |
| 1911 | </p> |
| 1912 | </dd> |
| 1913 | <dt> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 1914 | git log --since="2 weeks ago" -- gitk |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1915 | </dt> |
| 1916 | <dd> |
| 1917 | <p> |
| 1918 | Show the changes during the last two weeks to the file <em>gitk</em>. |
| 1919 | The "--" is necessary to avoid confusion with the <strong>branch</strong> named |
| 1920 | <em>gitk</em> |
| 1921 | </p> |
| 1922 | </dd> |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 1923 | <dt> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1924 | git log --name-status release..test |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 1925 | </dt> |
| 1926 | <dd> |
| 1927 | <p> |
| 1928 | Show the commits that are in the "test" branch but not yet |
| 1929 | in the "release" branch, along with the list of paths |
| 1930 | each commit modifies. |
| 1931 | </p> |
| 1932 | </dd> |
Junio C Hamano | 235d53f | 2007-07-13 00:25:15 | [diff] [blame] | 1933 | <dt> |
| 1934 | git log --follow builtin-rev-list.c |
| 1935 | </dt> |
| 1936 | <dd> |
| 1937 | <p> |
| 1938 | Shows the commits that changed builtin-rev-list.c, including |
| 1939 | those commits that occurred before the file was given its |
| 1940 | present name. |
| 1941 | </p> |
| 1942 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1943 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1944 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1945 | <h2 id="_discussion">Discussion</h2> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1946 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1947 | <div class="para"><p>At the core level, git is character encoding agnostic.</p></div> |
| 1948 | <div class="ilist"><ul> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1949 | <li> |
| 1950 | <p> |
| 1951 | The pathnames recorded in the index and in the tree objects |
| 1952 | are treated as uninterpreted sequences of non-NUL bytes. |
| 1953 | What readdir(2) returns are what are recorded and compared |
| 1954 | with the data git keeps track of, which in turn are expected |
| 1955 | to be what lstat(2) and creat(2) accepts. There is no such |
| 1956 | thing as pathname encoding translation. |
| 1957 | </p> |
| 1958 | </li> |
| 1959 | <li> |
| 1960 | <p> |
| 1961 | The contents of the blob objects are uninterpreted sequence |
| 1962 | of bytes. There is no encoding translation at the core |
| 1963 | level. |
| 1964 | </p> |
| 1965 | </li> |
| 1966 | <li> |
| 1967 | <p> |
| 1968 | The commit log messages are uninterpreted sequence of non-NUL |
| 1969 | bytes. |
| 1970 | </p> |
| 1971 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1972 | </ul></div> |
| 1973 | <div class="para"><p>Although we encourage that the commit log messages are encoded |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1974 | in UTF-8, both the core and git Porcelain are designed not to |
| 1975 | force UTF-8 on projects. If all participants of a particular |
| 1976 | project find it more convenient to use legacy encodings, git |
| 1977 | does not forbid it. However, there are a few things to keep in |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1978 | mind.</p></div> |
| 1979 | <div class="olist"><ol> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1980 | <li> |
| 1981 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1982 | <em>git-commit-tree</em> (hence, <em>git-commit</em> which uses it) issues |
Junio C Hamano | 14b7648 | 2008-01-05 10:32:26 | [diff] [blame] | 1983 | a warning if the commit log message given to it does not look |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1984 | like a valid UTF-8 string, unless you explicitly say your |
| 1985 | project uses a legacy encoding. The way to say this is to |
Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 1986 | have i18n.commitencoding in <tt>.git/config</tt> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1987 | </p> |
| 1988 | <div class="listingblock"> |
| 1989 | <div class="content"> |
Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 1990 | <pre><tt>[i18n] |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1991 | commitencoding = ISO-8859-1</tt></pre> |
| 1992 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1993 | <div class="para"><p>Commit objects created with the above setting record the value |
Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 1994 | of <tt>i18n.commitencoding</tt> in its <tt>encoding</tt> header. This is to |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1995 | help other people who look at them later. Lack of this header |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1996 | implies that the commit log message is encoded in UTF-8.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1997 | </li> |
| 1998 | <li> |
| 1999 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2000 | <em>git-log</em>, <em>git-show</em> and friends looks at the <tt>encoding</tt> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2001 | header of a commit object, and tries to re-code the log |
| 2002 | message into UTF-8 unless otherwise specified. You can |
| 2003 | specify the desired output encoding with |
Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 2004 | <tt>i18n.logoutputencoding</tt> in <tt>.git/config</tt> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2005 | </p> |
| 2006 | <div class="listingblock"> |
| 2007 | <div class="content"> |
Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 2008 | <pre><tt>[i18n] |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2009 | logoutputencoding = ISO-8859-1</tt></pre> |
| 2010 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2011 | <div class="para"><p>If you do not have this configuration variable, the value of |
| 2012 | <tt>i18n.commitencoding</tt> is used instead.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2013 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2014 | </ol></div> |
| 2015 | <div class="para"><p>Note that we deliberately chose not to re-code the commit log |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2016 | message when a commit is made to force UTF-8 at the commit |
| 2017 | object level, because re-coding to UTF-8 is not necessarily a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2018 | reversible operation.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 2019 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2020 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2021 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2022 | <div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2023 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2024 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2025 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2026 | <div class="para"><p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2027 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2028 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2029 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2030 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2031 | </div> |
| 2032 | <div id="footer"> |
| 2033 | <div id="footer-text"> |
Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame^] | 2034 | Last updated 2008-08-11 22:02:43 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2035 | </div> |
| 2036 | </div> |
| 2037 | </body> |
| 2038 | </html> |